package com.ruoyi.project.system.geocode.mapper;

import com.ruoyi.project.system.geocode.domain.Geocode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 无
 * 
 * @author lijing
 * @email 191237578@qq.com
 * @date 2019-03-11 15:31:30
 */
@Mapper
@Component
public interface GeocodeMapper {

    Geocode queryByDepCode(String depCode);


    @Select(" select * from sys_geocode where code like '__0000'   order by code")
    List<Geocode> selectDeptList();

    @Select(" select * from sys_geocode where (left(code,2) in (select distinct(left(geocode,2)) from project where geocode is not null) or code='100000') and code like '%0000'")
    List<Geocode> requireDepList();

}
